#include <osgViewer/Viewer>
#include <CommonLib/MainWindow/MainWindow.h>
#include "day1.h"
#include "day2.h"
#include "day3_4.h"
#include "day5.h"
#include "day6_7.h"
#include "day8.h"
#include "day9.h"
#include "day_load_obj.h"
#include "day_qt_layout.h"
#include "day_shader.h"
#include "Solar/Solar.h"

extern int day1();
extern int day2();
extern int day3_4( int argc, char **argv );
extern int day5( int argc, char **argv );
extern int day6_7( int argc, char **argv );
extern int day8( int argc, char **argv );
extern int day9( int argc, char **argv );
extern int day_load_obj();
extern int day_qt_layout( int argc, char **argv );
extern int day_shader( int argc, char **argv );
extern int solar( int argc, char **argv );

int main(int argc, char *argv[])
{
//    day1();
//    day2();
//    day3_4(argc, argv);
//    day5(argc, argv);
//    day6_7(argc, argv);
//    day8(argc, argv);
//    day9(argc, argv);
    day_load_obj();
//    day_qt_layout(argc, argv);
//    day_shader(argc, argv);
//    solar(argc, argv);

    return 0;
}

osgViewer::Viewer *createViewer()
{
    osg::ref_ptr<osgViewer::Viewer> rpViewer = new osgViewer::Viewer;
    rpViewer->realize();
    //设置显示窗口的大小
    osgViewer::Viewer::Windows ws;
    //得到窗口
    rpViewer->getWindows(ws);
    if (!ws.empty())
    {
        osgViewer::Viewer::Windows::iterator iter = ws.begin();
        for (; iter != ws.end(); iter++)
        {
            //可以自己设定大小
            (*iter)->setWindowRectangle(560, 240, 800, 600);
            //是否有窗口边框
            (*iter)->setWindowDecoration(true);
        }
    }
    return rpViewer.release();
}
